![]() |
GetDialogItem |
||||
Header: | Dialogs.h | Carbon status: | Supported | |
Obtains a handle to a dialog item.
void GetDialogItem ( DialogPtr theDialog, DialogItemIndex itemNo, DialogItemType *itemType, Handle *item, Rect *box );
A pointer to the dialog box to examine.
The position of the item in the dialog box’s item list resource; use FindDialogItem to determine this value.
A pointer to a short value. On return, the value identifies the item type of the dialog item requested in the itemNo parameter.
A pointer to an item handle. On return the handle refers to the item specified in the itemNo parameter or, for application-defined draw functions, a pointer (coerced to a handle) to the draw function.
A pointer to a rectangle. On return, the rectangle specifies the display rectangle (described in coordinates local to the dialog box), for the item specified in the itemNo parameter.
The GetDialogItem function produces the item type, a handle to the item (or, for application-defined draw functions, the function pointer), and the display rectangle for a specified item in an item list resource. When a control hierarchy is present in the dialog box, GetDialogItem gets the appropriate information (for example, a text handle) from the controls. If you wish to get a control handle for a dialog item in an embedding hierarchy, see GetDialogItemAsControl.
You should call GetDialogItem before calling functions such as SetDialogItemText that need a handle to a dialog item.
See also the function SetDialogItem.
This function was changed with Appearance Manager 1.0 to support retrieving item information from controls.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)